home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
DATABASE.DIR
/
00091_Script_Do Button
< prev
next >
Wrap
Text File
|
1996-03-28
|
5KB
|
180 lines
-- --------------------------------------------------------
-- The following versions of showPicture
-- allow the user to print the picture and the map.
-- --------------------------------------------------------
-- Handler showPicture shows the picture of the selected
-- topic
on showPicture
global pictureButton, printButton
global textState, textButton, mapButton
activateButtonKeepActivated(pictureButton)
setButtonState(textState,textButton)
-- removeLine
showTopicPicture
setTopicProperty("picture")
showMoreButtons
end
-- --------------------------------------------------------
-- The following version of showPicture does not
-- allow the user to print the picture and the map.
-- --------------------------------------------------------
-- Handler showPicture shows the picture of the selected
-- topic
--
--on showPicture
-- global pictureButton, browserTopicsLine, printButton
-- global textState, textButton, mapState, mapButton,lineSprite
--
-- activateButtonKeepActivated(pictureButton)
-- disableButton(printButton)
-- setButtonState(textState,textButton)
-- setButtonState(mapState,mapButton)
-- setButtonCursor(0, printButton)
-- removeLine
-- showTopicPicture
--end
--
-- --------------------------------------------------------
-- Handler showMap shows the map of the selected
-- topic
on showMap
global mapButton, printButton
global textState, textButton, pictureState, pictureButton
activateButtonKeepActivated(mapButton)
setButtonState(textState,textButton)
setButtonState(pictureState,pictureButton)
enableButton(printButton)
setButtonCursor(1, printButton)
showTopicMap
end
-- --------------------------------------------------------
-- The following version of showMap does not
-- allow the user to print the picture and the map.
-- --------------------------------------------------------
-- Handler showMap shows the map of the selected
-- topic
--
--on showMap
-- global mapButton, browserTopicsLine, printButton
-- global textState, textButton, pictureState, pictureButton
--
-- activateButtonKeepActivated(mapButton)
-- disableButton(printButton)
-- setButtonState(textState,textButton)
-- setButtonState(pictureState,pictureButton)
-- setButtonCursor(0, printButton)
-- showTopicMap
--end
-- --------------------------------------------------------
-- Handler showPrint
on showPrint
global printButton
activateButtonKeepActivated(printButton)
printItem
enableButton(printButton)
end
-- --------------------------------------------------------
-- Handler showText is called when the use clicks on the
-- text button. It shows the text of the current topic
-- and resets the states of the other buttons.
on showText
global browserTopicsLine
global pictureState, pictureButton
activateButtonKeepActivated(textButton)
removeTopicPicture
setButtonState(pictureState,pictureButton)
setTopicProperty("text")
showTopicText
end
-- --------------------------------------------------------
-- Handler showPrevPage is called when the user clicks on
-- the up arrow to show the previous page of text.
on showPrevPage
global pageUpButton
if isEnabled(pageUpButton) then
activateButtonThenEnable(pageUpButton)
showPage(-1)
end if
end
-- --------------------------------------------------------
-- Handler showNextPage is called when the user clicks on
-- the down arrow to show the next page of text.
on showNextPage
global pageDownButton
if isEnabled(pageDownButton) then
activateButtonThenEnable(pageDownButton)
showPage(1)
end if
end
-- --------------------------------------------------------
-- Handler removieLine removes the line under the title.
on removeLine
global lineSprite
set the visible of sprite lineSprite to FALSE
end
-- --------------------------------------------------------
-- Handler addLine adds the line under the title.
on addLine
global lineSprite
set the visible of sprite lineSprite to TRUE
end
-- --------------------------------------------------------
-- Handler doClickMoreUpButton is the sprite script for the
-- more up button. It shows the previous page of text if
-- the text button is activated and the previous picture if
-- the picture button is activated.
on doClickMoreUpButton
global topicProperty
if (topicProperty = "text") then
showPrevPage
else if (topicProperty = "picture") then
showPrevPicture
end if
end
-- --------------------------------------------------------
-- Handler doClickMoreDownButton is the sprite script for the
-- more down button. It shows the previous page of text if
-- the text button is activated and the previous picture if
-- the picture button is activated.
on doClickMoreDownButton
global topicProperty
if (topicProperty = "text") then
showNextPage
else if (topicProperty = "picture") then
showNextPicture
end if
end